package servlet;
import java.sql.*;
import java.io.*;
import java.util.*;
public class Connections 
{
	Connection conn=null;
    ResultSet rs=null;
    Statement stmt=null;
    String database,url,userid,userpwd,driver,query;
	public Connection getConnection()
	{
		database="realestate";
		userid="root";
		userpwd="root";
		url="jdbc:mysql://localhost:3306/"+database;
		driver="com.mysql.jdbc.Driver";
		
		try
			{
				Class.forName(driver);
				conn=DriverManager.getConnection(url,userid,userpwd);
			}
		catch(Exception e)
			{
				e.printStackTrace();
			}
		return conn;
	}

}
